//
//  LYFDiscoverRotate_bannerModel.m
//  段子手
//
//  Created by dllo on 16/3/19.
//  Copyright © 2016年 JokesTeam. All rights reserved.
//

#import "LYFDiscoverRotate_bannerModel.h"

@implementation LYFDiscoverRotate_bannerModel

- (instancetype)initWithDic:(NSDictionary *)dic {
    self = [super initWithDic:dic];
    if (self) {
        
    }
    return self;
}


- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"banner_url"]) {
        
        NSArray *arr = value[@"url_list"];
        if (arr.count >= 2) {
            
            self.photoUrl = value[@"url_list"][1][@"url"];
        } else if (arr.count == 1) {
            self.photoUrl = value[@"url_list"][0][@"url"];
        } else if (!arr.count) {
            
        }
        
        self.title = value[@"title"];
    }
}

@end
